Image rendering systems, such as augmented reality systems, may render two-dimensional images and provide image overlays on the rendered two-dimensional images. In one example, the image overlay may be a picture frame positioned on a wall depicted in the rendered two-dimensional image. To blend the image overlays with the rendered two-dimensional images, perspective is applied to the image overlays to match the perspective of the two-dimensional images. To provide augmented reality images to a user in real-time or near real-time, image overlays should be applied to the background images with appropriate perspective as quickly as possible.
Applying perspective to an overlay image requires locating vanishing points on background images to more accurately depict an object from the overlay image in the environment of the background image. For instance, in the example above, parallel lines of the picture frame are warped such that the parallel lines are directed to the vanishing point of the rendered two-dimensional image to accurately depict the picture frame with the same perspective as the rendered two-dimensional image. Existing techniques determine a vanishing point location based on every line segment of a background image. Once all of the line segments are identified, each intersection generated by extending each of the line segments is computed, and the intersections are provided to a clusterer that approximates a vanishing point.
Such techniques carry a significant computation cost due to the identification and reliance of each of the line segments in the image. The computation cost may, for example, result in a significant time lag when attempting to overlay images with appropriate perspective on the background image. Further, because some line segments in a background image are not relevant to a vanishing point calculation, inaccuracies are introduced into a mechanism of calculating the vanishing point (e.g., the clusterer) that may disrupt the calculation of the vanishing point.